package com.hs.telepass.utils;

import java.io.Closeable;
import java.io.IOException;
import java.net.HttpURLConnection;

public class IOUtil {
	public static void closeSilently(final Closeable closeable) {
		if (closeable != null) {
			try {
				closeable.close();
			} catch (final IOException e) {
				e.printStackTrace();
			}
		}
	}

	public static void disconnectSilently(final HttpURLConnection connection) {
		if (connection != null) {
			connection.disconnect();
		}
	}
}
